chore(stores): remove Zustand environment store and dead init scaffolding#3929
Conversation
PR SummaryMedium Risk Overview Refactors the floating variables modal store ( Reviewed by Cursor Bugbot for commit b4bc112. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR removes the Key changes:
The codebase search confirms no remaining references to Confidence Score: 5/5Safe to merge — pure dead-code removal and store consolidation with zero behavior change. All 15 changed files are internal refactors with no API-surface or data-flow changes. Exhaustive grep confirms no remaining uses of the removed store exports, methods, or scaffolding. The single finding (dead workflowId variable in deleteVariable) is a trivial P2 style nit that does not affect correctness. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Component / Hook] -->|before| B[useEnvironmentStore\nZustand]
A -->|after| C[usePersonalEnvironment\nReact Query]
B -->|synced via useEffect| C
C -->|reads| D[React Query Cache\nenvironmentKeys.personal]
D -->|populated by| E[fetchPersonalEnvironment\nAPI]
F[getClientEnvVars\ntools/utils.ts] -->|reads| D
G[resetAllStores\nstores/index.ts] -->|removeQueries| D
H[stores/variables/store.ts] -->|now UI-only| I[Modal position\n& dimensions]
J[stores/panel/variables/store.ts] -->|holds all| K[Variable CRUD\naddVariable / updateVariable / deleteVariable]
Reviews (2): Last reviewed commit: "chore(stores): remove Zustand environmen..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b4bc112. Configure here.
Summary
useEnvironmentStoreZustand store — env vars now read exclusively from React Query cachestores/variablesto UI-only (modal position/dimensions) — variable data already lives instores/panel/variablesloadForWorkflowfrom panel variables store (hydrated by registry, never called externally)stores/index.ts: removed emptyinitializeApplication(),useAppInitialization,reinitializeAfterLogin,logAllStores, and all dead init flags/hooksgetStoretest injection parameter fromgetClientEnvVars/createCustomToolRequestBodyType of Change
Testing
usePersonalEnvironment()populatesremoveQueriesChecklist